<template>
  <view class="elevtor-card">
    <view class="card_item">
      <view class="top_left" @click.stop="toEleDetail">
        <text style="vertical-align: middle">{{ msg.elevatorAddress }}</text>
        <uni-icons color="#999" size="16" type="arrowright" />
      </view>
     
    </view>
    <view class="card_item toInfo" @click="toInfo">
      <view class="elevtor_left">
        <view class="brand">{{ msg.brandName || "-" }}</view>
        <view class="private-num">{{ msg.privateNum || "-" }}</view>
      </view>
      <view class="elevto_right" v-if="!msg.isFull && msg.isHistory === '1'">
        <image
          src="@/static/images/tips.png"
          class="close"
          style="width: 32rpx; height: 32rpx"
        ></image>
        <uni-icons color="#999" size="18" type="arrowright" />
      </view>
    </view>
  </view>
</template>

<script>
export default {
	props: {
		msg: {
			type: Object,
		},
	},
	data() {
		return {
			isFull: false,
		};
	},
	created() {},
	computed: {
		// showIcon() {
		// 	if(t){
		// 	}
		// }
	},
	methods: {
		// 跳转电梯详情
		toEleDetail() {
			uni.navigateTo({
				url: `/subpages/elevator/projectInfo/eleDetail?id=${this.msg.elevatorId}`,
			});
		},
 
		toInfo() {
			console.log('区电梯也', this.msg);
			if (this.msg.isHistory === '2') {
				return;
			}
			uni.navigateTo({
				url: `/subpages/elevator/projectInfo/elevatorInfoPage?id=${this.msg.id}`,
				complete: (e) => {
					console.log(e);
				},
			});
		},
	},
};
</script>

<style lang="scss" scoped>
.elevtor-card {
  .card_item {
    position: relative;
    z-index: 111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #999;
    margin-bottom: 8rpx;
    font-size: 24rpx;

    image {
      width: 32rpx;
      height: 32rpx;
    }

    .elevtor_left {
      display: flex;

      .brand {
        padding-right: 10rpx;
        border-right: 1rpx solid #ccc;
      }

      .private-num {
        padding-left: 10rpx;
      }
    }

    .elevto_right {
      // position: relative;
      // z-index: 100;
      display: flex;
      align-items: center;
    }

    .top_left {
      font-size: 42rpx;
      font-weight: 600;
      word-break: break-word;
      color: #333;
      width: 556rpx;
    }

    .guide {
      display: flex;
      // flex: 1;
      margin-left: auto;
      justify-content: flex-end;
      color: #666;
      position: relative;
      z-index: 110;
    }

    .brand {
      padding-right: 10rpx;
      border-right: 1rpx solid #999;
    }
  }

  .toInfo {
    position: relative;
    z-index: 110;
  }
}
</style>
